uses gset, gutil, gvector, garrayutils;

type lesslli = specialize TLess<longint>;
     setlli = specialize TSet<longint, lesslli>;
     vectorlli = specialize TVector<longint>;
     rslli = specialize TArrayUtils<vectorlli, longint>;

var data:setlli; n,i:longint;
    buffer:vectorlli;

begin
  randomize;
  read(n);
  data:=setlli.create;
  buffer:=vectorlli.create;
  for i:=1 to n do
    buffer.pushback(i);
  rslli.RandomShuffle(buffer, n);
  for i:=0 to n-1 do begin
    data.insert(buffer[i]);
  end;
  for i:=0 to n-1 do begin
    data.find(buffer[i]);
    writeln(data.min^.data);
    data.delete(buffer[i]);
  end;

  buffer.Destroy;
  data.Destroy;
end.
